/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package cn.ac.iie.di.ban.nmpp.metastore;

import java.util.ArrayList;

/**
 *
 * @author wjt
 */
public class Table2MQRule {

    private String tableName;
    private String forwardMq;
    private String updateColumnMq;
    private String queryid;
    private ArrayList<String> columnSet = new ArrayList();

    public Table2MQRule(String tablename, String forwardmq, String updatecolumnmq, String queryid, String columnSet) {
        this.tableName = tablename;
        this.forwardMq = forwardmq;
        this.updateColumnMq = updatecolumnmq;
        this.queryid = queryid;
        ArrayList<String> column = null;
        if (columnSet != null) {
            column = new ArrayList<String>();
            String[] col = columnSet.split("[:]");
            for (int i = 0; i < col.length; i++) {
                column.add(col[i]);
            }
        } else {
            columnSet = null;
        }
        this.columnSet = column;
    }

    /**
     * @return the tableName
     */
    public String getTableName() {
        return tableName;
    }

    /**
     * @return the forwardMq
     */
    public String getForwardMq() {
        return forwardMq;
    }

    /**
     * @return the updateColumnMq
     */
    public String getUpdateColumnMq() {
        return updateColumnMq;
    }

    /**
     * @return the queryid
     */
    public String getQueryid() {
        return queryid;
    }

    /**
     * @return the columnSet
     */
    public ArrayList<String> getColumnSet() {
        return columnSet;
    }

}
